<template>
  <div class="login">
    <div class="login_from">
      <div class="am-form-group am-form-icon">
        <i class="am-icon-user"></i>
        <input type="text" class="am-form-field" placeholder="请输入账号" v-model="username">
      </div>

      <div class="am-form-group am-form-icon">
        <i class="am-icon-key"></i>
        <input type="password" class="am-form-field" placeholder="请输入密码" v-model="password">
      </div>

      <div class="am-form-group am-form-icon">
        <i class="am-icon-globe"></i>
        <input type="text" class="am-form-field" placeholder="请输入域名" v-model="domain">
      </div>

      <button class="am-btn am-btn-success am-btn-block" @click="login">登 录</button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'login',
  data () {
    return {
      username: '',
      password: '',
      domain: ''
    }
  },
  methods: {
    login: function () {
      __app.showAlert({content: '测试'})
    }
  },
  created () {
    __utils.setPageTitle('登录')
    this.username = localStorage.getItem("username")
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less" scoped>
  @import "../style/login.less";
</style>
